api.addButtonToToolbar({
    title: 'New task',
    icon: 'bx bx-task',
    shortcut: 'alt+n',
    action: async  () => {
        // creating notes is backend (server) responsibility so we need to pass
        // the control there
        const taskNoteId = await api.runAsyncOnBackendWithManualTransactionHandling(async  () => {
            const todoRootNote = await api.getNoteWithLabel('todoInProgress');
            const {note} = await api.createNote(todoRootNote.noteId, 'new task', type = "");

            return note.noteId;
        });

        // we got an ID of newly created note and we want to immediatelly display it
        await api.activateNewNote(taskNoteId);
    }
});